//
//  MSVideoBottomBar.h
//  MSPhotoBrowser
//
//  Created by zzg on 2021/8/30.
//

#import <UIKit/UIKit.h>

@protocol MSVideoBottomBarDelegate <NSObject>

- (void)videoBottomBarDidClickPlayPauseBtn;

/// 静音按钮
- (void)videoBottomBarDidClickMuted:(BOOL)muted;
- (void)videoBottomBarChangingSlider:(UISlider *)slider;
- (void)videoBottomBarDidEndChangeSlider:(UISlider *)slider;

@end

@interface MSVideoBottomBar : UIView

+ (instancetype)videoTMSar;


@property (nonatomic, weak) id<MSVideoBottomBarDelegate> delegate;
@property (nonatomic, strong) UIButton *playMutedBtn;
@property (nonatomic, strong) UIButton *playPauseBtn;
@property (nonatomic, strong) UISlider *playingProgressSlider;
@property (nonatomic, strong) UIProgressView *cacheProgressView;
@property (nonatomic, strong) UILabel *currentTimeLabel;
@property (nonatomic, strong) UILabel *totalTimeLabel;
@property (nonatomic) CGFloat totalHeight;


// 重置所有控件状态
- (void)resetTheBottomView;

// 根据视频长度设置初始控件状态
- (void)showStartWithVideoDuration:(CGFloat)videoDuration;

// 根据是否播放状态控制按钮左侧按钮显示
- (void)divideThePlayPauseButtonWithPlayStatus:(BOOL)playStatus;

// 根据当前播放进度设置UI
- (void)showProgressWithCurrentVideoTime:(CGFloat)currentTime;

@end
